package com.lottery.material.dao.article;

import com.lottery.material.pojo.article.ArticleActiveInfo;
import com.lottery.material.pojo.article.ArticleInfo;
import com.lottery.material.vo.portal.article.ArticleInfoListVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @description 文章活跃信息Mapper
 * @author rambo
 * @date 2019年4月11日 下午9:21:23
 */
@SuppressWarnings("JavaDoc")
public interface ArticleActiveInfoMapper {
	
    Integer deleteByPrimaryKey(Integer id);

    Integer insert(ArticleActiveInfo record);

    Integer insertSelective(ArticleActiveInfo record);

    ArticleActiveInfo selectByPrimaryKey(Integer id);

    Integer updateByPrimaryKeySelective(ArticleActiveInfo record);

    Integer updateByPrimaryKey(ArticleActiveInfo record);

    /**
     * description: 修改文章中所含赛事为结束状态
     * author sunny
     * createDate 2019-04-19 下午 3:46
     * @param articleId
     * @return
     */
    Integer updateIsCompetitionEndForTrue(String articleId);

    /**
     * description: 修改文章中推广相关信息
     * author sunny
     * createDate 2019-04-20 下午 12:10
     * @param paramMap
     * @return
     */
    Integer updateArticlePromotion(Map<String, Object> paramMap);

    /**
     * description: 查询推广文章
     * author sunny
     * createDate 2019-04-20 下午 4:04
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findPromotionArticle(Map<String, Object> paramMap);

    /**
     * description: 查询热帖文章
     * author sunny
     * createDate 2019-04-20 下午 5:42
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findHotArticle(Map<String, Object> paramMap);

    /**
     * description: 查询关注的文章
     * author sunny
     * createDate 2019-04-22 下午 7:17
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findAttentionArticle(Map<String, Object> paramMap);

    /**
     * description: 根据菜单编号查询不同的文章
     * author sunny
     * createDate 2019-04-22 下午 8:05
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findPublicArticle(Map<String, Object> paramMap);

    /**
     * description: 查询广场的文章
     * author sunny
     * createDate 2019-04-22 下午 8:21
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findPlazaArticle(Map<String, Object> paramMap);

    /**
     * description: 查询精彩的文章
     * author sunny
     * createDate 2019-04-23 上午 10:24
     * @param paramMap
     * @return
     */
    List<ArticleInfoListVo> findWonderfulArticle(Map<String, Object> paramMap);

    /**
     * description: 插入文章对象
     * author houjie
     * createDate 2019-04-22 下午 2:13
     * @param record
     * @return
     */
    Integer insertArticleInfo(ArticleInfo record);

    /**
     * description: 更新文章点赞量
     * author sunny
     * createDate 2019-04-25 下午 2:12
     * @param articleId
     * @param isLike
     * @return
     */
    Integer updateLikeTotalByArticleId(@Param("articleId") String articleId, @Param("isLike") String isLike);

    /**
     * description: 更新文章阅读量
     * author sunny
     * createDate 2019-04-25 下午 2:13
     * @param articleId
     * @return
     */
    Integer updateReadTotalByArticleId(String articleId);

    /**
     * description: 更新文章评论量
     * author sunny
     * createDate 2019-04-25 下午 2:18
     * @param articleId
     * @param isComment
     * @return
     */
    Integer updateCommentTotalByArticleId(@Param("articleId") String articleId, @Param("isComment") String isComment);

    /**
     * description: 根据文章id更新文章信息
     * author sunny
     * createDate 2019-04-26 下午 4:41
     * @param articleInfo
     * @return
     */
    Integer updateByArticleId(ArticleInfo articleInfo);

    /**
     * description: 删除文章（逻辑删除）
     * author sunny
     * createDate 2019-04-29 下午 5:57
     * @param articleId
     * @return
     */
    Integer deleteByArticleId(String articleId);
}
